package ru.tatintec.gwttest.client.presenter;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.moxieapps.gwt.highcharts.client.Point;

public class Converter {
	
	public static Point[] convert(Map<Integer, Integer> in) {
		Point[] out = new Point[in.size()];
		List<Point> list = new ArrayList<Point>();
		
		for (Integer key : in.keySet()) {
			Point point = new Point(key, in.get(key));
			list.add(point);
		}
		list.toArray(out);
		return out;
	}

}
